   <?php
   include_once ("../Login/databaseconnection.php");
	 $Training_Id=$_POST['Training_Id'];
	$T_NIC_Number=$_POST['T_NIC_Number'];
     $Member_Id=$_POST['Member_Id'];
    $From_Date=$_POST['From_Date'];
	date_default_timezone_set("Europe/Paris");
    $t_d=date("Y-m-d");
if($Training_Id!=""&&$T_NIC_Number!=""&&$Member_Id!=""&&$From_Date!="")
{
  mysql_query("INSERT INTO  resource_team(Training_Id,T_NIC_Number,Member_Id,From_Date,Last_Updated_Date)VALUES('$Training_Id','$T_NIC_Number','$Member_Id','$From_Date','$t_d')");
   if(mysql_affected_rows()!=0)
  {
$_SESSION['error']="This record is successfully registered!";
$_SESSION['OK']="OK";
$_SESSION['Training_Id']=$Training_Id;
$_SESSION['T_NIC_Number']=$T_NIC_Number;
  }
if(mysql_affected_rows()==0)
  {
$_SESSION['error']="Sorry unable to register this record!";
  }
}
  if($Training_Id==""||$T_NIC_Number==""||$Member_Id==""||$From_Date=="")
{
$_SESSION['errorin']="All details are required,Please fill all!";
}
 ?>
